package com.liveinstars.xxl;

import com.xxl.job.core.log.XxlJobLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * Created by guoyanjiang on 2018/9/29.
 */
@Service
public class LogService {

    Logger logger = LoggerFactory.getLogger(getClass());

    public void info(String appendLogPattern, Object ... appendLogArguments) {
        XxlJobLogger.log(appendLogPattern, appendLogArguments);
    }

    public void error(Throwable e) {
        XxlJobLogger.log(e);
    }

    public void error(String pattern, Object... args){
        logger.error(pattern, args);
    }

    public void error(String msg, Throwable throwable) {
        logger.error(msg, throwable);
    }
}
